package pl.edu.mimuw.irs.rcp;

import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;

public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

	public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
		super(configurer);
	}
/*
	public ActionBarAdvisor createActionBarAdvisor(
			IActionBarConfigurer configurer) {
		return new ApplicationActionBarAdvisor(configurer);
	}
	*/
	public void preWindowOpen() {
		Rectangle bounds = Display.getCurrent().getBounds();
		
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
		configurer.setInitialSize(new Point(bounds.width - 100, bounds.height - 100));

		//configurer.setInitialSize(new Point(900, 700));
		configurer.setShowCoolBar(false);
		configurer.setShowStatusLine(false);
		configurer.setTitle("IRS - Intelligent Resource Sharing");
	}
	/*
	@Override
	public void postWindowCreate() {
		super.postWindowCreate();
		try {
			getWindowConfigurer().getWindow().getActivePage().openEditor(
					new MultiEditorInput(new String[0], new IEditorInput[0]), 
					IRSWorkflowEditor.ID);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
	}*/
}
